package cn.amoqi.springboot.rabbit.controller;

import cn.amoqi.springboot.rabbit.rabbit.topic.TopicSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TopicController {

    @Autowired
    private TopicSender topicSender;

    /**
     * 获取消息跟交换机设定的routerKey有关
     */
    @RequestMapping("/topic1")
    public void test1() {
        topicSender.send();
    }

    @RequestMapping("/topic2")
    public void test2() {
        topicSender.send1();
    }

    @RequestMapping("/topic3")
    public void test3() {
        topicSender.send2();
    }
}
